package mysql

import (
	"github.com/lzzyuhyy/framework/mysql"
	"go-interview-forum/model/category"
	"go-interview-forum/model/exchain"
	"go-interview-forum/model/interview"
	"go-interview-forum/model/report"
	"go-interview-forum/model/user"
	"gorm.io/gorm"
)

func AutoMigrate() error {
	return mysql.CreateMySQLClient(func(db *gorm.DB) error {
		return db.AutoMigrate(
			&user.User{},
			&user.UserAnswer{},
			&exchain.ExChain{},
			&interview.Interview{},
			&category.Category{},
			&report.BrushReportUser{},
		)
	})
}
